﻿import QtQuick 2.0
import QtQuick.Controls 2.12
import QtGraphicalEffects 1.12
Popup{
    width: 634
    height: 338
    closePolicy: Popup.CloseOnEscape
    anchors.centerIn: parent
    padding: 0
    background: Rectangle {
        color: Qt.rgba(0,0,0,0)   //背景为无色
    }
    Rectangle{
        color: "#272c39"
        anchors.fill: parent
        radius: 8
        border.width:2
        border.color:"#20FFFFFF"
        Image{
            x: 576
            y:25
            opacity: 0.2
            source: "qrc:/imgs/close_4.png"
            sourceSize.width: 28
            sourceSize.height: 28
            MouseArea{
                anchors.fill: parent
                onClicked: {
                    close()
                }
            }
        }

        Rectangle{
            width: 192
            height: 67
            x:76
            y:231
            radius: 13
            layer.enabled: true
            color: "#272c39"
            border.color: "#10FFFFFF"
            border.width:2
            layer.effect: DropShadow {
                transparentBorder: true
                horizontalOffset: 4
                verticalOffset: 4
                spread: 0.0
            }
            Text {
                anchors.centerIn: parent
                text: qsTr("确 定")
                font.pointSize: 28
                font.family: "Roboto"
                color: '#3FFFFFFF'
            }
        }
        Rectangle{
            width: 192
            height: 67
            x:368
            y:231
            radius: 13
            layer.enabled: true
            color: "#272c39"
            border.color: "#10FFFFFF"
            border.width:2
            layer.effect: DropShadow {
                transparentBorder: true
                horizontalOffset: 4
                verticalOffset: 4
                spread: 0.0
            }
            Text {
                anchors.centerIn: parent
                text: qsTr("取 消")
                font.pointSize: 28
                font.family: "Roboto"
                color: '#FFFFFF'
                MouseArea{
                    anchors.fill: parent
                    onClicked: {
                        close()
                    }
                }
            }
        }
        Text {
            y:39
            anchors.horizontalCenter: parent.horizontalCenter
            text: qsTr("是否退出远程驾驶？")
            font.pointSize: 24
            font.family: "PingFang HK"
            color: '#FFFFFF'
        }
        Text {
            y:120
            x:188
            text: qsTr("车辆未置P档,液压闭锁未开启\n\t请调整后再试")
            font.pointSize: 15
            font.family: "PingFang HK"
            color: '#FFFFFF'
        }
        Image {
            id:img
            x:126
            y:119
            source: "qrc:/imgs/broken_4.png"
        }
    }
    enter: Transition {
        NumberAnimation { property: "opacity"; from: 0.0; to: 1.0;duration: 200}
    }
    exit:  Transition {
        NumberAnimation { property: "opacity"; from: 1.0; to: 0.0;duration: 200}
    }
}
